
import Layout from '@/views/Layout.vue'
const testRouter = [
    {
        path: '/test',
        name: 'test',
        title: '测试',
        component: Layout,
        redirect: '/test/index',
        children: [
            {
                path: '/test/index',
                name: 'text_index',
                title: '测试主页',
                component: () => import('@/views/Test/Index.vue')
            },
            {
                path: '/test/test1',
                name: 'test1',
                title: '测试一级路由',
                redirect: '/test/test1/test1child',
                component: { render: h => h("router-view") },   //渲染函数动态添加router-view
                children: [
                    {
                        path: '/test/test1/test1child',
                        name: 'test1child',
                        title: '测试子路由1',
                        auth: ['editor'],
                        component: () => import('@/views/Test/Test1Child/Test1Child.vue'),
                    },
                    {
                        path: '/test/test1/test2child',
                        name: 'test2child',
                        title: '测试子路由2',
                        component: () => import('@/views/Test/Test1Child/Test2Child.vue')
                    }
                ]
            },
        ]
    },
]

export { testRouter }